package com.tbit.uqbike.push.constant;

import com.tbit.uqbike.push.exception.BaseException;

import java.util.Map;


/**
 * 响应代码
 *
 * @author Leon
 * 2013-10-15 上午10:04:24
 */
public class ResponseCode {
    /**
     * 成功
     */
    public final static Integer SUCC = 1;
    /**
     * 失败
     */
    public final static Integer FAIL = 0;


    /**
     * 结果布尔值
     */
    public final static String RET = "ret";
    /**
     * 描述
     */
    public final static String MSG = "msg";
    /**
     * 结果内容
     */
    public final static String DATA = "data";

    /**
     * 消息响应
     */
    public static void printException(Map<String, Object> map, BaseException e) {
        map.put(ResponseCode.RET, ResponseCode.FAIL);
        map.put(ResponseCode.MSG, e.getMessage());
    }
}
